package request

import (
	"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
	"gorm.io/datatypes"
	_ "gorm.io/datatypes"
	"time"
)

type ArchiveFileSearch struct {
	StartCreatedAt *time.Time `json:"startCreatedAt" form:"startCreatedAt"`
	EndCreatedAt   *time.Time `json:"endCreatedAt" form:"endCreatedAt"`

	TypeId     *int   `json:"typeId" form:"typeId" `
	LocationId *int   `json:"locationId" form:"locationId" `
	Name       string `json:"name" form:"name" `
	request.PageInfo
}

type CreateArchiveFile struct {
	TypeId     *int           `json:"typeId" form:"typeId" binding:"required"`         //档案类型
	LocationId *int           `json:"locationId" form:"locationId" binding:"required"` //线下存放位置
	Name       string         `json:"name" form:"name" binding:"required"`             //档案名称
	File       datatypes.JSON `json:"file" form:"file"`                                //档案文件
}

type UpdateArchiveFile struct {
	ID         uint           `json:"ID"`
	TypeId     *int           `json:"typeId" form:"typeId" binding:"required"`         //档案类型
	LocationId *int           `json:"locationId" form:"locationId" binding:"required"` //线下存放位置
	Name       string         `json:"name" form:"name" binding:"required"`             //档案名称
	File       datatypes.JSON `json:"file" form:"file"`                                //档案文件
}

type AutoCreateArchiveFile struct {
	TypeName     string `json:"typeName" form:"typeName" binding:"required"`
	LocationName string `json:"locationName" form:"locationName" binding:"required"`
	ArchiveName  string `json:"archiveName" form:"archiveName" binding:"required"`
}
